package com.example.demo.feign;

import com.example.demo.entity.Blog;
import org.springblade.core.launch.constant.AppConstant;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "blade-demo",fallback = BlogClientFallback.class)
public interface IBlogClient {
	/**
	 * 接口前缀
	 */
	String API_PREFIX = "/demo/blog";

	/**
	 * 获取详情
	 *
	 * @param id 主键
	 * @return
	 */
	@GetMapping(API_PREFIX + "/detail")
	R<Blog> detail(@RequestParam("id") Integer id);
}
